package com.chen.convert.post;

import com.chen.controller.admin.post.vo.PostCreateReqVO;
import com.chen.controller.admin.post.vo.PostRespVO;
import com.chen.controller.admin.post.vo.PostSimpleRespVO;
import com.chen.controller.admin.post.vo.PostUpdateReqVO;
import com.chen.dal.dateobject.post.PostDO;
import com.chen.pojo.PageResult;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface PostConvert {
    PostConvert CONVERT= Mappers.getMapper(PostConvert.class);

    PostDO convert01(PostCreateReqVO reqVO);

    PostDO convert01(PostUpdateReqVO reqVO);

    PostRespVO convert01(PostDO postDO);


    PostSimpleRespVO convert02(PostDO postDO);

    List<PostSimpleRespVO> convert03(List<PostDO> postSimpleList);

    PageResult<PostRespVO>  convert03(PageResult<PostDO> postPageResult);
}
